package com.yidu.ReportManagement.service.impl;

import com.yidu.ReportManagement.entity.ChengjiaoQingSuan;
import com.yidu.ReportManagement.mapper.ChengjiaoQingSuanMapper;
import com.yidu.ReportManagement.service.ChengjiaoQingSuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 梁俊
 * @date 2023/2/9
 * &@version 1.0
 */
@Service
public class ChengjiaoQingSuanServiceImpl implements ChengjiaoQingSuanService {

    @Autowired
    public ChengjiaoQingSuanMapper chengjiaoQingSuanMapper;

    @Override
    public List<ChengjiaoQingSuan> selectChengjiaoQingSuan(int limit, int page,String dealTime) {
        Map map=new HashMap();
        map.put("dealTime",dealTime);
        map.put("page",(page-1)*limit);
        map.put("limit",limit);
        return chengjiaoQingSuanMapper.selectChengjiaoQingSuan(map);
    }

    @Override
    public int selectCount(String dealTime) {
        return chengjiaoQingSuanMapper.selectCount(dealTime);
    }
}

